package com.diligreat.interceptor; 


import com.diligreat.service.StartUpService;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**  
 * @Author Bruce 
 * @Date 2012-11-11
 * @Comments
 */
public class CheckCacheInterceptor extends AbstractInterceptor{
	private static final long serialVersionUID = 1L;

	private StartUpService startUpService;
	

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		//System.out.println("execute CheckCacheInterceptor...");
		String result = null;
		
		
		/*if(condtion1){
			result = Action.INPUT;
		}else if(condition2){
			result = Action.ERROR;
		}else if(condition3){
			result = Action.LOGIN
		}else if(condition4){
			result = Action.SUCCESS;
		}else{
			result = invocation.invoke();
		}
		
		if(Cache.getCache().getLang()==null)
		{
			Cache.getCache().setLang(this.startUpService.getSecStepLang());
		}
		*/
		
		result = invocation.invoke();
		return result;
	}
	
	
	
	public StartUpService getStartUpService() {
		return startUpService;
	}

	public void setStartUpService(StartUpService startUpService) {
		this.startUpService = startUpService;
	}

}
 